home *** CD-ROM | disk | FTP | other *** search
- try
- -- AppleScript still uses old file/alias magic by default
- -- therefore we have to use POSIX
- set srcImg to (POSIX path of "/tmp/picture.tiff")
-
- tell application "MulleSight"
-
- -- save prior state
- set shouldScale to should scale
- set useSelection to use selection
-
- -- now set what we need
- set should scale to false
- set use selection to false
-
- -- save the image as TIFF (other formats are not supported)...
- save in srcImg as "tiff"
-
- -- reset prior state
- set should scale to shouldScale
- set use selection to useSelection
- end tell
-
- -- just for the fun of it, convert TIFF into JPEG
- set dstImg to (POSIX path of "/tmp/picture.jpg")
- tell application "Image Events"
- launch
- set img to open srcImg
- save img as JPEG in file dstImg with icon
- close img
- end tell
-
- on error errorMsg
- display dialog errorMsg
- end try
-